<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui"
	xmlns:jc="http://jcertif.com/facelets">

<ui:composition template="/templates/template.xhtml">
	<ui:define name="content">
		<jc:pageBanner title="#{msg['login.banner.title']}" />
		
		<c:if test="#{param['returnUrl'] != null}">
			<c:set var="returnUrl" value="#{param['returnUrl']}" scope="flash"></c:set>
			
			<c:if test="#{param['returnUrl'] == '/faces/speaker/suggest.jsf'}">
				<h:outputLabel value="#{msg['suggest.loginrequired']}" />
			</c:if>
		
		</c:if>
		

		<h:form id="loginForm">
			<h:panelGrid columns="2" columnClasses="label, value" styleClass="grid">

				<h:outputText value="#{msg['login.email']} *" />
				<p:inputText id="email" value="#{loginBean.user.email}" required="true"
					requiredMessage="#{msg['login.email.reqmsg']}"
					validatorMessage="#{msg['login.email.invalidmsg']}" />

				<h:outputText value="#{msg['login.password']} *" />
				<p:inputText id="password" value="#{loginBean.user.passwd}" type="password"/>

				<p:commandButton value="#{msg['login.button']}" update="loginForm"
					actionListener="#{loginBean.connect}" />
				<p:messages />
				<h:commandLink action="#{loginBean.reset}" value="#{msg['login.resetpassword']}" update="loginForm" />
				<h:outputLabel value="" />
				
			</h:panelGrid>
<h:link outcome="/faces/join/join.xhtml" value="#{msg['login.join']}"/>
		</h:form>
		

		
	</ui:define>
</ui:composition>
</html>